(function () {
    'use strict';

    angular.module('BlurAdmin.pages.member', [])
        .config(routeConfig);

    /** @ngInject */
    function routeConfig($stateProvider, $urlRouterProvider) {
        $stateProvider
            .state('member', {
                url: '/member',
                template : '<ui-view  autoscroll="true" autoscroll-body-top></ui-view>',
                abstract: true,
                title: '成员',
                sidebarMeta: {
                    icon: 'fa fa-user',
                    order: 300,
                },
            })
            .state('member.list', {
                url: '/list',
                templateUrl: 'app/pages/member/list/member-list.html',
                controller: 'MemberListCtrl as vm',
                title: '成员列表',
                sidebarMeta: {
                    order: 0,
                }
            })
            .state('member.info', {
                url: '/info/{memberId:string}',
                params: {
                    memberId: null
                },
                templateUrl: 'app/pages/member/info/member-info.html',
                controller: 'MemberInfoCtrl as vm',
                title: '成员信息详情'
            })
            .state('member.edit', {
                url: '/edit/{memberId:string}',
                params: {
                    memberId: null
                },
                templateUrl: 'app/pages/member/info/member-edit.html',
                controller: 'MemberEditCtrl as vm',
                title: '成员信息修改'
            });
        $urlRouterProvider.when('/member','/member/list');
    }

})();
